<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用工单位合同')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<style>
    .jltable{
        margin: auto;
    }
    .jltable th,td{
        min-height: 40px;
        min-width: 50px;
        border: 1px solid #eee;
        padding: 10px;
    }
</style>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-gsht-edit" th:object="${lwpqGsht}">
            <input name="id" th:field="*{id}" type="hidden">
            <h4 class="form-header h4">基本信息</h4>
            <table class="jltable">
                <tbody>
                <tr>
                    <td><label class=" control-label is-required">甲方</label></td>
                    <td><input th:field="*{jf}" name="jf" class="form-control" type="text" required></td>
                    <td style="width: 70px"></td>
                    <td> <label class=" control-label">乙方</label></td>
                    <td><input th:field="*{yf}" name="yf" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class=" control-label">甲方编号</label></td>
                    <td><input th:field="*{jfbh}" name="jfbh" class="form-control" type="text"></td>
                    <td style="width: 70px"></td>
                    <td>  <label class=" control-label">乙方编号</label></td>
                    <td><input th:field="*{yfbh}" name="yfbh" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td> <label class=" control-label">甲方代表</label></td>
                    <td><input th:field="*{jfdb}" name="jfdb" class="form-control" type="text"></td>
                    <td style="width: 70px"></td>
                    <td> <label class=" control-label">乙方代表</label></td>
                    <td><input th:field="*{yfdb}" name="yfdb" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class=" control-label">甲方电话</label></td>
                    <td><input th:field="*{jfdh}" name="jfdh" class="form-control" type="text"></td>
                    <td style="width: 70px"></td>
                    <td><label class=" control-label">乙方电话</label></td>
                    <td><input th:field="*{yfdh}" name="yfdh" class="form-control" type="text"></td>
                </tr>
                </tbody>
            </table>

            <h4 class="form-header" style="margin-top: 20px">合同信息</h4>
            <table class="jltable">
                <tbody>
                <tr>
                    <td> <label class=" control-label">合同编号</label></td>
                    <td><input th:field="*{htbh}"  name="htbh" class="form-control" type="text"></td>
                    <td><label class=" control-label">签订时间</label></td>
                    <td>
                        <div class="input-group date">
                            <input th:value="${#dates.format(lwpqGsht.qdsj, 'yyyy-MM-dd')}" name="qdsj" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><label class="control-label">合同类型</label></td>
                    <td>
                        <select name="htlx" class="form-control" th:with="type=${@dict.getType('pqhtlx')}">
                            <option th:field="*{htlx}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </td>
                    <td><label class="control-label">合同期限</label></td>
                    <td><input th:field="*{htqx}" name="htqx" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td> <label class=" control-label">生效时间</label></td>
                    <td>
                        <div class="input-group date">
                            <input th:value="${#dates.format(lwpqGsht.sxsj, 'yyyy-MM-dd')}" name="sxsj" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </td>
                    <td><label class="control-label">结束时间</label></td>
                    <td>
                        <div class="input-group date">
                            <input th:value="${#dates.format(lwpqGsht.jssj, 'yyyy-MM-dd')}" name="jssj" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>  <label class=" control-label">合同金额</label></td>
                    <td><input th:field="*{htje}" name="htje" class="form-control" type="text"></td>
                    <td></td><td></td>
                </tr>
                </tbody>

            </table>


            <h4 class="form-header" style="margin-top: 20px">业务信息</h4>
            <table class="jltable">
                <tbody>
                <tr>
                    <td> <label class="control-label">发薪周期</label></td>
                    <td>
                        <select name="fxzq" class="form-control " th:with="type=${@dict.getType('pqfxzq')}">
                            <option th:field="*{fxzq}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </td>
                    <td></td>
                    <td><label class=" control-label">服务费标准</label></td>
                    <td><input th:field="*{fwfbz}" name="fwfbz" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class=" control-label">工资发放日</label></td>
                    <td><input th:field="*{gzffr}" name="gzffr" class="form-control" type="text"></td>
                    <td></td>
                    <td><label class=" control-label">参保标准</label></td>
                    <td><input  th:field="*{cbbz}"name="cbbz" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class="control-label">招聘人数</label></td>
                    <td><input th:field="*{zprs}" name="zprs" class="form-control" type="text"></td>
                    <td></td>
                    <td><label class="control-label">费用结算日</label></td>
                    <td><input th:field="*{fyjsr}" name="fyjsr" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class="control-label">签约报价</label></td>
                    <td><input th:field="*{qybj}" name="qybj" class="form-control" type="text"></td>
                    <td></td>
                    <td><label class="control-label">考勤提供日</label></td>
                    <td><input th:field="*{kqtgr}" name="kqtgr" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class="control-label">保底工时</label></td>
                    <td><input th:field="*{bdgs}" name="bdgs" class="form-control" type="text"></td>
                    <td></td>
                    <td><label class="control-label">休假安排</label></td>
                    <td><input th:field="*{xjap}" name="xjap" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td><label class="control-label">保险服务</label></td>
                    <td><input th:field="*{bxfw}" name="bxfw" class="form-control" type="text"></td>
                    <td></td>
                    <td><label class=" control-label">结算方式</label></td>
                    <td><input th:field="*{jsfs}" name="jsfs" class="form-control" type="text"></td>
                </tr>
                <tr>
                    <td> <label class="control-label">合同内容</label></td>
                    <td colspan="4"> <textarea th:field="*{htnr}" name="htnr" class="form-control" type="text"></textarea></td>
                </tr>
                <tr>
                    <td><label class="control-label">相关文件</label></td>
                    <td colspan="4">
                        <input  type="hidden" name="xgwj">
                        <div class="file-loading">
                            <input class="form-control file-upload" id="xgwj" name="file" type="file">
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>

            <h4 class="form-header" style="margin-top: 20px">公帐信息</h4>
            <table class="jltable">
                <tbody>
                <tr>
                    <td><label class="control-label">开户行</label></td>
                    <td><input th:field="*{khh}" name="khh" class="form-control" type="text"></td>
                    <td style="width: 95px"></td>
                    <td><label class="control-label">公司账号</label></td>
                    <td><input th:field="*{gszh}" name="gszh" class="form-control" type="text"></td>
                </tr>
                </tbody>
            </table>        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "lwpq/gsht";
        $("#form-gsht-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-gsht-edit').serialize());
            }
        }

        $("input[name='qdsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='sxsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='jssj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $(".file-upload").each(function (i) {
            var val = $("input[name='" + this.id + "']").val()
            $(this).fileinput({
                'uploadUrl': ctx + 'common/upload',
                initialPreviewAsData: true,
                initialPreview: [val],
                maxFileCount: 1,
                autoReplace: true
            }).on('fileuploaded', function (event, data, previewId, index) {
                $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
            }).on('fileremoved', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            })
            $(this).fileinput('_initFileActions');
        });
    </script>
</body>
</html>